package xwj.example.demo.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import xwj.example.demo.domain.Supplier;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xwj
 * @since 2022-10-30
 */
@Mapper
public interface SupplierDao extends BaseMapper<Supplier> {
    @Select("select * from supplier s" +
            " inner join product_supplier_list ps on s.id=ps.supplier_list_id" +
            " where ps.product_id = #{productIds}")
    public List<Supplier> findSuppliersByProduct(String productId);
}
